package com.jwdf.uda.http.action;

import android.content.Context;
import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;
import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/14 14:27
 * 邮箱：648859026@qq.com
 */
public class GuideDelCommentAction extends AHttpService<PbBean.PbResCommentDelComment>{
    /**
     *  搭配指导删除评论
     * @param context
     * @param commentId 评论ID
     * @return
     */
    public static GuideDelCommentAction newInstance(Context context, int commentId){
        return new GuideDelCommentAction(context, commentId);
    }
    private int commentId;
    private GuideDelCommentAction(Context context, int commentId) {
        super(context);
        this.commentId = commentId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqCommentDelComment.Builder builder = PbBean.PbReqCommentDelComment.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setId(commentId);

        return apiService.replyDelComment(builder.build());
    }
}
